//
//  ViewController.m
//  UI21_04_Block 实现网络请求回调
//
//  Created by 李劲成 on 16/4/7.
//  Copyright © 2016年 ljc. All rights reserved.
//

#import "ViewController.h"
#import "NetworkHandler.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    [self handleData];
    [self handleData1];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)handleData {
    [NetworkHandler networkHandlerGetWithURL:@"http://api.m.mtime.cn/News/NewsList.api?pageIndex=1" completionHandler:^(id result, NSURLResponse *response, NSError *error) {
      
        NSLog(@"%@", response);
        NSLog(@"%@", result);
    }];
}

- (void)handleData1 {
    [NetworkHandler networkHandlerPostWithURL:@"http://api.m.mtime.cn/News/NewsList.api" Arguments:@"pageIndex=1" completionHandler:^(id result, NSURLResponse *response, NSError *error) {
  
        NSLog(@"%@", result);
    }];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
